package mahi.collection;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.List;

public class Name1 implements Comparable<Name1>, Serializable{
	String firstName;
	transient String lastName;
	int age;
	
	public Name1(String s1, String s2, int age1) {
		firstName = s1;
		lastName =s2;
		this.age = age1;
	}
	
	
	 public String toString() {
			return firstName + " " + lastName;
	}
	 
	 
	
	@Override
	public int compareTo(Name1 o) {
		return 0;
	}
	
	 public static void main(String[] args) {
			List<Name1> lst = new ArrayList<Name1>();
			lst.add(new Name1("mahender","singh",28));
			lst.add(new Name1("abc","def",12));
			
		Collections.sort(lst);
		
	Collections.synchronizedList(lst);
	Collections.
			
		
			
		}

}
